# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql-login_hook
_projname=login_hook
pkgver=1.6
pkgrel=0
pkgdesc="PostgreSQL database extension to mimic a logon trigger"
url="https://github.com/splendiddata/login_hook"
arch="all"
license="GPL-3.0-or-later"
makedepends="postgresql-dev"
subpackages="$pkgname-doc"
install="$pkgname.post-install"
source="https://github.com/splendiddata/login_hook/archive/Version_$pkgver/postgresql-login_hook-$pkgver.tar.gz"
builddir="$srcdir/$_projname-Version_$pkgver"
options="!check"  # XXX: tests require running PostgreSQL

build() {
	make
}

package() {
	depends="postgresql$(pg_config --major-version)"

	make DESTDIR="$pkgdir" install
}

sha512sums="
20e196e7756e882e583aaf8ae0ec46ce5f6d289f8fef6d56c0bbb574d86ad0531c95bff71a03b44f1a71b3a97004263ce1ea63d1548eeb5ab618a3cf4d211a30  postgresql-login_hook-1.6.tar.gz
"
